buildarg = -trimpath -ldflags "-s -w -extldflags '-static' ${version_info}" -gcflags=-trimpath=$$GOPATH -asmflags=-trimpath=$$GOPATH

.PHONY : all
all: bin-linux bin-windows

.PHONY : bin-linux
bin-linux:
	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build $(buildarg) -o dist/jrebel-brains-license-server
	upx dist/jrebel-brains-license-server

.PHONY : bin-windows
bin-windows:
	CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build $(buildarg) -o dist/jrebel-brains-license-server.exe
	upx dist/jrebel-brains-license-server.exe

.PHONY : clean
clean:
	/bin/rm -rf dist/*


